// ---自定义变量
:root {
  --sa-basic-mask-background: rgba(38, 38, 38, 0.7); // 遮罩
  --sa-basic-mask-color: #fdfdfd; // 遮罩文字color
  --sa-padding: 20px;
  --sa-color: #737182;
}

// ---明亮/暗黑/跟随系统 var变量
@import './mode/dark.scss';
@import './mode/light.scss';

// ---主题
@import './theme/sheep.scss';
@import './theme/element.scss';
@import './theme/classical.scss';

.mode-light,
.mode-system {
  @include mode-light;
  &.theme-sheep {
    @include sheep-light;
  }
  &.theme-element {
    @include element-light;
  }
  &.theme-classical {
    @include classical-light;
  }
}

.mode-dark {
  @include mode-dark;
  &.theme-sheep {
    @include sheep-dark;
  }
  &.theme-element {
    @include element-dark;
  }
  &.theme-classical {
    @include classical-dark;
  }
}

@media (prefers-color-scheme: dark) {
  .mode-system {
    @include mode-dark;
    &.theme-sheep {
      @include sheep-dark;
    }
    &.theme-element {
      @include element-dark;
    }
    &.theme-classical {
      @include classical-dark;
    }
  }
}

// ---自定义 element-plus var变量
html:root {
  --el-color-white: #ffffff;
  --el-color-black: #000000;
  --el-color-primary-rgb: 64, 158, 255;
  --el-color-success-rgb: 103, 194, 58;
  --el-color-warning-rgb: 230, 162, 60;
  --el-color-danger-rgb: 245, 108, 108;
  --el-color-error-rgb: 245, 108, 108;
  --el-color-info-rgb: 144, 147, 153;
  --el-font-size-extra-large: 20px;
  --el-font-size-large: 18px;
  --el-font-size-medium: 16px;
  --el-font-size-base: 14px;
  --el-font-size-small: 13px;
  --el-font-size-extra-small: 12px;
  --el-font-family: 'Helvetica Neue', Helvetica, 'PingFang SC', 'Hiragino Sans GB',
    'Microsoft YaHei', '微软雅黑', Arial, sans-serif;
  --el-font-weight-primary: 500;
  --el-font-line-height-primary: 24px;
  --el-index-normal: 1;
  --el-index-top: 1000;
  --el-index-popper: 2000;
  --el-border-radius-base: 4px;
  --el-border-radius-small: 2px;
  --el-border-radius-round: 20px;
  --el-border-radius-circle: 100%;
  --el-transition-duration: 0.3s;
  --el-transition-duration-fast: 0.2s;
  --el-transition-function-ease-in-out-bezier: cubic-bezier(0.645, 0.045, 0.355, 1);
  --el-transition-function-fast-bezier: cubic-bezier(0.23, 1, 0.32, 1);
  --el-transition-all: all var(--el-transition-duration)
    var(--el-transition-function-ease-in-out-bezier);
  --el-transition-fade: opacity var(--el-transition-duration)
    var(--el-transition-function-fast-bezier);
  --el-transition-md-fade: transform var(--el-transition-duration)
      var(--el-transition-function-fast-bezier),
    opacity var(--el-transition-duration) var(--el-transition-function-fast-bezier);
  --el-transition-fade-linear: opacity var(--el-transition-duration-fast) linear;
  --el-transition-border: border-color var(--el-transition-duration-fast)
    var(--el-transition-function-ease-in-out-bezier);
  --el-transition-box-shadow: box-shadow var(--el-transition-duration-fast)
    var(--el-transition-function-ease-in-out-bezier);
  --el-transition-color: color var(--el-transition-duration-fast)
    var(--el-transition-function-ease-in-out-bezier);
  --el-component-size-large: 40px;
  --el-component-size: 32px;
  --el-component-size-small: 24px;
}

html:root {
  color-scheme: light;
  --el-color-white: #ffffff;
  --el-color-black: #000000;
  --el-color-primary: #409eff;
  --el-color-primary-light-3: #79bbff;
  --el-color-primary-light-5: #a0cfff;
  --el-color-primary-light-7: #c6e2ff;
  --el-color-primary-light-8: #d9ecff;
  --el-color-primary-light-9: #ecf5ff;
  --el-color-primary-dark-2: var(--t-btn-active);
  --el-color-success: #67c23a;
  --el-color-success-light-3: #95d475;
  --el-color-success-light-5: #b3e19d;
  --el-color-success-light-7: #d1edc4;
  --el-color-success-light-8: #e1f3d8;
  --el-color-success-light-9: #f0f9eb;
  --el-color-success-dark-2: #529b2e;
  --el-color-warning: #e6a23c;
  --el-color-warning-light-3: #eebe77;
  --el-color-warning-light-5: #f3d19e;
  --el-color-warning-light-7: #f8e3c5;
  --el-color-warning-light-8: #faecd8;
  --el-color-warning-light-9: #fdf6ec;
  --el-color-warning-dark-2: #b88230;
  --el-color-danger: #f56c6c;
  --el-color-danger-light-3: #f89898;
  --el-color-danger-light-5: #fab6b6;
  --el-color-danger-light-7: #fcd3d3;
  --el-color-danger-light-8: #fde2e2;
  --el-color-danger-light-9: #fef0f0;
  --el-color-danger-dark-2: #c45656;
  --el-color-error: #f56c6c;
  --el-color-error-light-3: #f89898;
  --el-color-error-light-5: #fab6b6;
  --el-color-error-light-7: #fcd3d3;
  --el-color-error-light-8: #fde2e2;
  --el-color-error-light-9: #fef0f0;
  --el-color-error-dark-2: #c45656;
  --el-color-info: #909399;
  --el-color-info-light-3: #b1b3b8;
  --el-color-info-light-5: #c8c9cc;
  --el-color-info-light-7: #dedfe0;
  --el-color-info-light-8: #e9e9eb;
  --el-color-info-light-9: #f4f4f5;
  --el-color-info-dark-2: #73767a;
  --el-bg-color: var(--sa-background-assist); // sa
  --el-bg-color-page: var(--sa-background-assist); // sa
  --el-bg-color-overlay: var(--sa-background-assist); // sa
  --el-text-color-primary: var(--sa-title); // sa
  --el-text-color-regular: var(--sa-subtitle); // sa
  --el-text-color-secondary: var(--sa-font); // sa
  --el-text-color-placeholder: var(--sa-place); // sa
  --el-text-color-disabled: var(--sa-subfont); // sa
  --el-border-color: var(--sa-border); // sa
  --el-border-color-light: var(--sa-border); // sa
  --el-border-color-lighter: var(--sa-border); // sa
  --el-border-color-extra-light: var(--sa-border); // sa
  --el-border-color-dark: var(--sa-border); // sa
  --el-border-color-darker: var(--sa-border); // sa
  --el-fill-color: #f0f2f5;
  --el-fill-color-light: var(--sa-background-hex-hover); // sa
  --el-fill-color-lighter: var(--sa-table-striped); // sa
  --el-fill-color-extra-light: #fafcff;
  --el-fill-color-dark: #ebedf0;
  --el-fill-color-darker: #e6e8eb;
  --el-fill-color-blank: var(--sa-background-assist); // sa
  --el-box-shadow: 0 12px 32px 4px rgba(0, 0, 0, 0.04), 0 8px 20px rgba(0, 0, 0, 0.08);
  --el-box-shadow-light: 0 0 12px rgba(0, 0, 0, 0.12);
  --el-box-shadow-lighter: 0 0 6px rgba(0, 0, 0, 0.12);
  --el-box-shadow-dark: 0 16px 48px 16px rgba(0, 0, 0, 0.08), 0 12px 32px rgba(0, 0, 0, 0.12),
    0 8px 16px -8px rgba(0, 0, 0, 0.16);
  --el-disabled-bg-color: var(--sa-background-hex-hover);
  --el-disabled-text-color: var(--sa-place);
  --el-disabled-border-color: var(--el-border-color-light);
  --el-overlay-color: rgba(0, 0, 0, 0.8);
  --el-overlay-color-light: rgba(0, 0, 0, 0.7);
  --el-overlay-color-lighter: rgba(0, 0, 0, 0.5);
  --el-mask-color: var(--sa-mask-background); // sa
  --el-mask-color-extra-light: rgba(255, 255, 255, 0.3);
  --el-border-width: 1px;
  --el-border-style: solid;
  --el-border-color-hover: var(--el-color-primary); // sa
  --el-border: var(--el-border-width) var(--el-border-style) var(--el-border-color);
  --el-svg-monochrome-grey: var(--el-border-color);
}

@import 'element-plus/theme-chalk/src/index.scss';
@import './element-reset.scss';
